<?php
$menus = Menu::get(array('@condition'=>array('status','role'=>'menu','parent_id'=>array('IS'=>'NULL')),'@order'=>'weight, id'));
?>
    <div class="left_menu" style="background:url(<?=X3::app()->theme['cover']?>);">
    <div class="menu-header" style="background-image:url(<?=X3::app()->theme['menuheader']?>)"><div class="menu_head">&nbsp;</div></div>
    <div class="left_menu1" style="background-image: url(<?=X3::app()->theme['menutile']?>)">
    <div class="left_menu2" style="background-image: url(<?=X3::app()->theme['menutile']?>)">
        <ul>
            <?foreach($menus as $model):?>
            <li><a  menuid="<?=$model->id?>"  href="<?=$model->link?>"><?=$model->title?></a></li>
            <?endforeach;?>
            <?if(X3::user()->isAdmin() || X3::user()->isEditor()):?>
            <li class="admin"><a href="/page/add<?=X3::app()->page_id>0?'?parent_id='.X3::app()->page_id:''?>">Создать материал</a></li>
            <?endif;?>
        </ul>
    </div>
    </div>
    </div>